﻿#ifndef _FD_MODELMETAINFO_H_
#define _FD_MODELMETAINFO_H_ 

#include "../dll_cfg.h"
#include "kernel/time/time.h"

namespace FD
{
	namespace Utility
	{
		namespace Dataset
		{
			class FD_XDataset_Export ModelMetaInfo
			{
			public:
				ModelMetaInfo()
				{
					mAuthor = "UnKnown";
					mVersion = 1;
					mDesc = "";

					mCreateDate = FD::Kernel::Time::currentTime();
					mFromDate = mCreateDate;
					mToDate = mCreateDate;
				}
				virtual ~ModelMetaInfo(){}

				void setAuthor(const String& au){mAuthor = au;}
				const String& getAuthor(){return mAuthor;}

				void setCreateDate(FD::Kernel::Time& t){mCreateDate = t;}
				const FD::Kernel::Time& getCreateDate(){return mCreateDate;}

				void setFromDate(FD::Kernel::Time& t){mFromDate = t;}
				const FD::Kernel::Time& getFromDate(){return mFromDate;}

				void setToDate(FD::Kernel::Time& t){mToDate = t;}
				const FD::Kernel::Time& getToDate(){return mToDate;}

				void setVersion(uint32 v){mVersion = v;}
				uint32 getVersion(){return mVersion;}

				void setDescription(const String& desc){mDesc = desc;}
				const String& getDescriptioin(){return mDesc;}

				ModelMetaInfo* clone()
				{
					ModelMetaInfo* metaInfo = new ModelMetaInfo;
					metaInfo->mAuthor = mAuthor;
					metaInfo->mCreateDate = mCreateDate;
					metaInfo->mFromDate = mFromDate;
					metaInfo->mToDate = mToDate;
					metaInfo->mVersion = mVersion;
					metaInfo->mDesc = mDesc;

					return metaInfo;
				}
			protected:
				String mAuthor;
				FD::Kernel::Time mCreateDate;
				FD::Kernel::Time mFromDate;
				FD::Kernel::Time mToDate;
				uint32 mVersion;
				String mDesc;
			};
			
		}
	}
}


#endif
